package com.h2cloud.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 返回数据标准类型
 */
@Getter
@Setter
@ToString
public class BaseResp<T> {
    //登录成功
    public final static int LOGIN_SUCCESS = 200;
    public static final String LOGIN_SUCCESS_MSG = "登录成功";

    //密码错误
    public final static int PASSWORD_ERROR = 201;
    public static final String PASSWORD_ERROR_MSG = "密码错误，请重新填写";

    //账号不存在
    public final static int NO_ACCOUNT = 202;
    public static final String NO_ACCOUNT_MSG = "账号不存在，请先注册";

    //账号 或 密码为空
    public final static int ACCOUNT_OR_PASSWORD_NULL = 203;
    public final static String ACCOUNT_OR_PASSWORD_NULL_MSG = "账号或密码不能为空";

    //账号已存在
    public final static int HAS_ACCOUNT = 204;
    public final static String HAS_ACCOUNT_MSG = "该账号已经存在，可直接登录";

    //注册成功
    public final static int REGISTER_SUCCESS = 205;
    public final static String REGISTER_SUCCESS_MSG = "注册成功";

    //图片处理成功
    public final static int HANDLE_SUCCESS = 206;

    //图片处理失败
    public final static int HANDLE_ERROR = 207;


    private int code;
    //    提示信息
    private String msg;
    //    业务数据
    private T data;
}
